<template>
	<view class="no-login-index">
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="2500" :duration="2500">
				<swiper-item v-for="item in swiper.image" :key="item.imageUrl" @click="handleBanner(item)">
					<view class="image-con">
						<image class="banner-image" :src="`${constInfo.srcConst}${item.imageUrl}`" style="width: 700rpx" mode="widthFix"></image>
					</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script setup>
import { ref, reactive, onMounted } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { storeToRefs } from 'pinia';
import initApi from '@/apis/init.js';
import { constStore } from '@/store/const.js';
import { useUserStore } from '@/store/user.js';
//引入防抖函数
const { constInfo } = constStore();
const { userInfo } = useUserStore();

const swiper = reactive({
	image: [
		{
			imageUrl: '/sxzz/hht-5.png'
		},
		{
			imageUrl: '/sxzz/nangua-5.png'
		},
		{
			imageUrl: '/sxzz/youku-5.png'
		}
	]
});

const handleBanner = (item) => {
	console.log(item);
};
</script>

<style lang="scss" scoped>
.no-login-index {
	position: relative;
	.uni-margin-wrap{
		position: absolute;
		top: 20rpx;
	}
}
</style>
